<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
//http://localhost:8080/logistics/
%>
<!DOCTYPE HTML>
<html>
<head>
<!-- 设置页面的 基本路径，页面所有资源引入和页面的跳转全部基于 base路径 -->
<base href="<%=basePath%>">

<link rel="stylesheet" href="lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="lib/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript" src="lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>



<ul id="permissionTree" class="ztree"></ul>


</body>

<script type="text/javascript">
//1.zTree 设置 默认为控
var setting = {
		check: {enable: true}
	};


//2.zTree的数据（标准的JSON数据）
var zNodes = [{
	name:"管理员管理",id:1,open:true,
	children:[{
			name:"角色管理",id:2,open:true,
			children:[
				{name:"新增角色",id:3},
				{name:"修改角色",id:4},
				{name:"删除角色",id:5},
				{name:"查询角色",id:6}
			]},
			{
				name:"管理员列表",id:2,open:true,
				children:[
					{name:"新增管理员",id:3},
					{name:"修改管理员",id:4},
					{name:"删除管理员",id:5},
					{name:"查询管理员",id:6}
				]}
	]
}];


$(function(){
	//初始化zTree
	$.fn.zTree.init($("#permissionTree"), setting, zNodes);
});


</script>

</html>